<h:layout tpl="_layout"/>

<form method="post">
模板: <br/>
<input type="text" name="tpl" size="88" value="{{$_x.tpl}}"/> <c:if !$exists><font color="red">不存在</font></c:if><br/>
源码: <br/>
<textarea name="source" rows="25" cols="86" id="source">{{$contents|escape:'html'}}</textarea><br/>
<input type="submit" value="保 存" name="save"/> <input type="submit" name="save_and_refresh" value="保存并刷新"/> <input type="button" name="delete" value="删 除" onclick="window.location='{{$_router}}/if_helper_template/delete?tpl={{$_x.tpl|urlencode}}'"/>
</form>

<div id="debug"></div>
<h:javascript>
$(function () {
	createTextAreaWithLines("source", 1000);
	$("#source").keydown(function (event) {
		if (event.keyCode == 9) {
			editorInsert(this, "\t");
			return false;
		}
	});
});
</h:javascript>